<?php include_once 'include.php'; ?>
<!DOCTYPE html>
<html>
<head>
    <?php include_once 'common_js_css.php'?>
	<link rel="stylesheet" type="text/css" href="css/index.css">
</head>
<body>
<!-- 顶部 B -->
<div class="top center">
	<div class="center">
	<div class="fl">
		<img src="images/pz.png">	
	</div>
	<div class="top_p fl">
		<p class="p1">广东培正学院</p>
		<p class="p2">数据结构精品课程网站</p>
	</div>
		<div class="link fr">
		<ul>
		    <li><a href="http://www.peizheng.com.cn/" class="fr">广东培正学院官网</a></li>
		    <li><a href="http://qg.peizheng.net.cn/" class="fr"> 广东培正学院青果教务网</a></li>
		</ul>
	</div>
	</div>
</div>
<!-- 顶部 E -->

<!-- 菜单导航 B-->
<div class="nav center">
	<div class="center nav_c">
		<ul>
			<li><a class="nRed" href="main.php" target="mainFrame">首页</a></li>
			<li><a href="scroe.php" target="mainFrame">课程介绍</a></li>
			<li><a href="dagang.php" target="mainFrame">教学大纲</a></li>
			<li><a href="kejian.php" target="mainFrame">课程课件及动画</a></li>
			<li><a href="shiyan.php" target="mainFrame">课程实验</a></li>
			<li><a href="lianxi.php" target="mainFrame">课程练习</a></li>
			<li><a href="message.php" target="mainFrame">留言板</a></li>
            <?php if ($_SESSION): ?>
			<li>
                <a href="#" onclick="admin('<?php echo $_SESSION['id']; ?>','<?php echo $_SESSION['identity'];?>')">后台管理</a>
            </li>
            <?php endif; ?>
		</ul>
	</div>
</div>
<!-- 菜单导航 E-->
<!-- 内容 B -->
<div class="mid center">
    <!-- 左边 B -->
    <div class="left fl">
        <?php if (!$_SESSION): ?>
        <div class="dl">
            <div class="title">
                <a href="#" class="a4">用户登录</a>
            </div>
            <div class="l_fang">
                  <form name="form1" method="post" action="">
                      <table width="344" height="150" border="0" align="center">
                          <tr>
                              <td width="101" align="right">用户名：</td>
                              <td width="220"><label for="username"></label>
                                  <input name="username" type="text" id="username" maxlength="10" class="txt"></td>
                          </tr>
                          <tr>
                              <td align="right">密 码：</td>
                              <td><label for="pwd"></label>
                                  <input name="pwd" type="password" id="pwd" maxlength="15" class="txt"></td>
                          </tr>
                          <tr>
                              <td align="right">权 限：</td>
                              <td><label for="quanxian"></label>
                                  <select name="quanxian" id="quanxian" style="font-size:18px;">
                                      <option value="普通用户" style="font-size:42px;">普通用户</option>
                                      <option value="管理员">管理员</option>
                                  </select></td>
                          </tr>
                      </table>
                      <a href="zhaohuipwd.php" style="float: right;margin-right: 25px;" target="mainFrame">忘记密码</a>
                      <a href="regist.php" style="float: right;margin-right: 25px;" target="mainFrame">没账号？去注册</a>
                      <input type="button" style="margin: 30px 0 0 150px;size: 50px" value="登录" class="btn" onclick="login(1)">
                  </form>
            </div>
        </div>
        <?php else: ?>
        <div class="dl">
                <div class="title">
                    <a href="#" class="a4">欢迎<?php echo $_SESSION['name'] ?></a>
                </div>
                <div class="l_fang" style="">
                    <table width="344" height="253" border="0" align="center">
                        <tr>
                            <td align="center">
                                <a href="doAction.php?act=dologout">退出登录</a>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        <?php endif; ?>
        <div class="tz">
            <div class="title">
                <a href="#" class="a4">通知公告</a>
            </div>
            <div class="l_fang">
                <div class="gun">
                     <marquee border="0" direction="up" height="100%" onMouseOut="start()" onMouseOver="stop()"
                    scrollamount="1" scrolldelay="50">
                         <h2 style="align-content: center">
                             <?php
                             $sql = "select content from lyy_gonggao WHERE del=1 AND status=1 ORDER BY createtime limit 1";
                             $res = mysqli_query(conn(),$sql);
                             $list = mysqli_fetch_assoc($res);
                             echo $list['content'];
                             ?>
                         </h2>
                        <!--<p class="p4">
                    &nbsp;&nbsp;&nbsp;&nbsp;欢迎大家使用本网站，希望此网站可以帮助您学习《数据结构》。</p>
                        <p class="p4">&nbsp;&nbsp;&nbsp;&nbsp;好好学习，天天向上，越努力越幸运。</p>-->

                     </marquee>
                 </div>
            </div>
        </div>
        <div class="dg">
            <div class="title">
                <a href="#" class="a4">教学大纲</a>
            </div>
            <div class="l_fang">
                <ul>
                    <li><a href="dagang.php " target="mainFrame">教学内容及要求</a>
                    </li>
                    <li><a href="dagang.php " target="mainFrame">实验教学安排</a>
                    </li>
                    <li><a href="dagang.php " target="mainFrame">教学方法与策略</a>
                    </li>
                    <li><a href="dagang.php " target="mainFrame">教材、实验指导推荐书</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <!-- 左边 E -->
    <!-- 右边 B -->
    <div class="cont fl">
        <!--嵌套内容开始-->
        <iframe src="main.php"  frameborder="0" name="mainFrame" width="1000px" height="100%"></iframe>
        <!--嵌套内容结束-->
    </div>
    <!-- 右边 E -->
</div>
<!-- 内容 E -->
<!-- 底部 B -->
<div class="foot center">
	<span>地址：广州市花都区广大培正学院&nbsp;|&nbsp;邮编：510830  |  Copyright © 2018&nbsp;广东培正学院Family</span>
</div>
<!-- 底部 E -->

</body>
</html>